home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------------------------
- // AsynchErrorNotificationUPP
- //----------------------------------------------------------------------------------------------
- typedef pascal void (*AsynchErrorNotificationProcPtr) (StringHandle string);
-
- #if GENERATINGCFM
- typedef UniversalProcPtr AsynchErrorNotificationUPP;
- #else
- typedef AsynchErrorNotificationProcPtr AsynchErrorNotificationUPP;
- #endif
-
- enum
- {
- uppAsynchErrorNotificationProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StringHandle)))
- };
-
- #if GENERATINGCFM
- #define NewAsynchErrorNotificationProc(userRoutine) \
- (AsynchErrorNotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppAsynchErrorNotificationProcInfo, GetCurrentISA())
- #else
- #define NewAsynchErrorNotificationProc(userRoutine) \
- (AsynchErrorNotificationUPP)(userRoutine)
- #endif
-
- #if GENERATINGCFM
- #define CallAsynchErrorNotificationProc(userRoutine, notifyStringHdle) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppAsynchErrorNotificationProcInfo, (notifyStringHdle))
- #else
- #define CallAsynchErrorNotificationProc(userRoutine, notifyStringHdle) \
- (*(userRoutine))((notifyStringHdle))
- #endif
-
- //----------------------------------------------------------------------------------------------
- // EndNotificationUPP
- //----------------------------------------------------------------------------------------------
- typedef pascal void (*EndNotificationProcPtr) ();
-
- #if GENERATINGCFM
- typedef UniversalProcPtr EndNotificationUPP;
- #else
- typedef EndNotificationProcPtr EndNotificationUPP;
- #endif
-
- enum
- {
- uppEndNotificationProcInfo = kPascalStackBased
- };
-
- #if GENERATINGCFM
- #define NewEndNotificationProc(userRoutine) \
- (EndNotificationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppEndNotificationProcInfo, GetCurrentISA())
- #else
- #define NewEndNotificationProc(userRoutine) \
- (EndNotificationUPP)(userRoutine)
- #endif
-
- #if GENERATINGCFM
- #define CallEndNotificationProc(userRoutine) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppEndNotificationProcInfo)
- #else
- #define CallEndNotificationProc(userRoutine) \
- (*(userRoutine))()
- #endif
-
- //----------------------------------------------------------------------------------------------
- // InForegroundUPP
- //----------------------------------------------------------------------------------------------
- typedef pascal Boolean (*InForegroundProcPtr) ();
-
- #if GENERATINGCFM
- typedef UniversalProcPtr InForegroundUPP;
- #else
- typedef InForegroundProcPtr InForegroundUPP;
- #endif
-
- enum
- {
- uppInForegroundProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
- };
-
- #if GENERATINGCFM
- #define NewInForegroundProc(userRoutine) \
- (InForegroundUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppInForegroundProcInfo, GetCurrentISA())
- #else
- #define NewInForegroundProc(userRoutine) \
- (InForegroundUPP)(userRoutine)
- #endif
-
- #if GENERATINGCFM
- #define CallInForegroundProc(userRoutine) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppInForegroundProcInfo)
- #else
- #define CallInForegroundProc(userRoutine) \
- (*(userRoutine))()
- #endif
-
- //----------------------------------------------------------------------------------------------
- // StatusMessageUPP
- //----------------------------------------------------------------------------------------------
- typedef pascal void (*StatusMessageProcPtr) (StringHandle string);
-
- #if GENERATINGCFM
- typedef UniversalProcPtr StatusMessageUPP;
- #else
- typedef StatusMessageProcPtr StatusMessageUPP;
- #endif
-
- enum
- {
- uppStatusMessageProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StringHandle)))
- };
-
- #if GENERATINGCFM
- #define NewStatusMessageProc(userRoutine) \
- (StatusMessageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppStatusMessageProcInfo, GetCurrentISA())
- #else
- #define NewStatusMessageProc(userRoutine) \
- (StatusMessageUPP)(userRoutine)
- #endif
-
- #if GENERATINGCFM
- #define CallStatusMessageProc(userRoutine, statusStringHdle) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppStatusMessageProcInfo, (notifyStringHdle))
- #else
- #define CallStatusMessageProc(userRoutine, statusStringHdle) \
- (*(userRoutine))((notifyStringHdle))
- #endif
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
-
- //----------------------------------------------------------------------------------------------
- // TOldPrintMonitorPrintingData:
- // for classic background printing and desktop printing that does not support third-party drivers
- //----------------------------------------------------------------------------------------------
- typedef struct
- {
- short iOpCode;
- short iError;
- long iReserved;
- THPrint hPrint;
- short noProcs;
- long iReserved2;
- AsynchErrorNotificationUPP pASyncNotificationProc; //UPP to put up a notification
- EndNotificationUPP pASyncEndnotifyProc; //UPP to take down the notification
- InForegroundUPP pInForegroundProc; //UPP to check if we are is in foreground
- } TOldPrintMonitorPrintingData;
-
- //----------------------------------------------------------------------------------------------
- // TDesktopPrintingData:
- // for Desktop Printing that supports third-party drivers
- //----------------------------------------------------------------------------------------------
- typedef struct
- {
- short iOpCode;
- short iError;
- long iReserved;
- THPrint hPrint;
- short noProcs;
- long iReserved2;
- AsynchErrorNotificationUPP pASyncNotificationProc; //UPP to put up a notification
- EndNotificationUPP pASyncEndnotifyProc; //UPP to take down the notification
- InForegroundUPP pInForegroundProc; //UPP to check if we are is in foreground
- StatusMessageUPP pStatusMessageProc; //UPP to update the status message in the desktop printer window
- } TDesktopPrintingData;
-
- //----------------------------------------------------------------------------------------------
- //----------------------------------------------------------------------------------------------
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-